
/* Header Graphic Visualizer */

#ifndef ITF_GV_HEADER
#define ITF_GV_HEADER

#include <QObject>

#include <graphviz/gvc.h>

#include "prefix_tree.h"
#include "sim_interface.h"

#include "itf_mc.h"
#include "itf_state_transition.h"

class GraphicArrangement : public QObject
{
    Q_OBJECT

public:
	GraphicArrangement();
	~GraphicArrangement();
    
    void setLayout(char*);
	void fromTrie(psa*);
    void fromMc(markovChain mc);
	QRect boundingRect();
    QMap<int, State*> getStateItems();
    QMap<int, Event*> getEventItems();
	void display(QGraphicsScene*);

signals:
    void valueChanged(int newValue);
    
private:
	GVC_t *gvc;
	Agraph_t *gvc_graph;
    
    QMap<int, State*> map_state_id2State;
    QMap<int, Event*> map_event_id2Event;
};

#endif
